home *** CD-ROM | disk | FTP | other *** search
- -- card: 4741 from stack: in
- -- bmap block id: 0
- -- flags: 0000
- -- background id: 4396
- -- name:
-
-
- -- part 3 (button)
- -- low flags: 00
- -- high flags: 8003
- -- rect: left=354 top=102 right=139 bottom=468
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Next Problem
- ----- HyperTalk script -----
- on mouseUp
- if field "Flag" = 0 then exit mouseUp
- show button "Smiley"
- show button "Frowney"
- put empty into field "Comment"
- put " " into field "Minuend"
- put " " into field "Subtrahend"
- put empty into field "Difference"
- if field "Attempts" = second word of bkgnd field "Options" then
- put field "Attempts" into attempts
- put field "Correct" into correct
- put field "Percent" into percent
- put field "Name" into name
- put third word of field "Options" into skill
- put "O" into field "Attempts"
- put "O" into field "Correct"
- put "O" into field "Percent"
- set the lockScreen to true
- set the cursor to 4
- go to first card of bkgnd "Users"
- rotateData
- put name into line 1 of field "name"
- put the date into line 1 of field "Date"
- put skill into line 1 of field "Skill"
- put attempts into line 1 of field "Attempts"
- put correct into line 1 of field "Correct"
- put percent into line 1 of field "Percent"
- pop card
- exit mouseUp
- end if
- put " " into num2
- get the random of 80
- add 9 to it
- put it into num1
- put 9 into it
- subtract second char of num1 from it
- if it>2 then get the random of it else put 1 into it
- subtract 1 from it
- put it into second char of num2
- put 8 into it
- subtract first char of num1 from it
- if it>2 then get the random of it else put 1 into it
- put it into first char of num2
- put num1 into num3
- add num2 to num3
- put " " into field "Difference"
- put "0" into field "Flag"
- put "?" into char 3 of field "Difference"
- put num3 into field "Minuend"
- put num2 into field "Subtrahend"
- end mouseUp
-
- on rotateData
- repeat with x = 11 down to 1
- if line x of field "Name" is empty then next repeat
- put x into nextLine
- add 1 to nextLine
- get line x of field "Name"
- put it into line nextLine of field "Name"
- get line x of field "Date"
- put it into line nextLine of field "Date"
- get line x of field "Skill"
- put it into line nextLine of field "Skill"
- get line x of field "Attempts"
- put it into line nextLine of field "Attempts"
- get line x of field "Correct"
- put it into line nextLine of field "Correct"
- get line x of field "Percent"
- put it into line nextLine of field "Percent"
- end repeat
- end rotateData
-
-
-
-
- -- part 4 (button)
- -- low flags: 00
- -- high flags: 8003
- -- rect: left=355 top=161 right=194 bottom=388
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: 7
- ----- HyperTalk script -----
- on mouseUp
- repeat with x=3 down to 2
- if char x of field "Difference" is "?" then
- put "7" into char x of field "Difference"
- put x into it
- subtract 1 from it
- if x>2 then put "?" into char it of field "Difference"
- exit mouseUp
- end if
- end repeat
- end mouseUp
-
-
-
- -- part 5 (button)
- -- low flags: 00
- -- high flags: 8003
- -- rect: left=395 top=161 right=194 bottom=427
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: 8
- ----- HyperTalk script -----
- on mouseUp
- repeat with x=3 down to 2
- if char x of field "Difference" is "?" then
- put "8" into char x of field "Difference"
- put x into it
- subtract 1 from it
- if x>2 then put "?" into char it of field "Difference"
- exit mouseUp
- end if
- end repeat
- end mouseUp
-
-
-
- -- part 6 (button)
- -- low flags: 00
- -- high flags: 8003
- -- rect: left=435 top=162 right=194 bottom=467
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: 9
- ----- HyperTalk script -----
- on mouseUp
- repeat with x=3 down to 2
- if char x of field "Difference" is "?" then
- put "9" into char x of field "Difference"
- put x into it
- subtract 1 from it
- if x>2 then put "?" into char it of field "Difference"
- exit mouseUp
- end if
- end repeat
- end mouseUp
-
-
-
- -- part 7 (button)
- -- low flags: 00
- -- high flags: 8003
- -- rect: left=356 top=201 right=233 bottom=389
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: 4
- ----- HyperTalk script -----
- on mouseUp
- repeat with x=3 down to 2
- if char x of field "Difference" is "?" then
- put "4" into char x of field "Difference"
- put x into it
- subtract 1 from it
- if x>2 then put "?" into char it of field "Difference"
- exit mouseUp
- end if
- end repeat
- end mouseUp
-
-
-
- -- part 8 (button)
- -- low flags: 00
- -- high flags: 8003
- -- rect: left=395 top=202 right=234 bottom=428
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: 5
- ----- HyperTalk script -----
- on mouseUp
- repeat with x=3 down to 2
- if char x of field "Difference" is "?" then
- put "5" into char x of field "Difference"
- put x into it
- subtract 1 from it
- if x>2 then put "?" into char it of field "Difference"
- exit mouseUp
- end if
- end repeat
- end mouseUp
-
-
-
- -- part 9 (button)
- -- low flags: 00
- -- high flags: 8003
- -- rect: left=435 top=201 right=233 bottom=466
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: 6
- ----- HyperTalk script -----
- on mouseUp
- repeat with x=3 down to 2
- if char x of field "Difference" is "?" then
- put "6" into char x of field "Difference"
- put x into it
- subtract 1 from it
- if x>2 then put "?" into char it of field "Difference"
- exit mouseUp
- end if
- end repeat
- end mouseUp
-
-
-
- -- part 10 (button)
- -- low flags: 00
- -- high flags: 8003
- -- rect: left=356 top=242 right=274 bottom=389
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: 1
- ----- HyperTalk script -----
- on mouseUp
- repeat with x=3 down to 2
- if char x of field "Difference" is "?" then
- put "1" into char x of field "Difference"
- put x into it
- subtract 1 from it
- if x>2 then put "?" into char it of field "Difference"
- exit mouseUp
- end if
- end repeat
- end mouseUp
-
-
-
- -- part 11 (button)
- -- low flags: 00
- -- high flags: 8003
- -- rect: left=395 top=241 right=273 bottom=428
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: 2
- ----- HyperTalk script -----
- on mouseUp
- repeat with x=3 down to 2
- if char x of field "Difference" is "?" then
- put "2" into char x of field "Difference"
- put x into it
- subtract 1 from it
- if x>2 then put "?" into char it of field "Difference"
- exit mouseUp
- end if
- end repeat
- end mouseUp
-
-
-
- -- part 12 (button)
- -- low flags: 00
- -- high flags: 8003
- -- rect: left=436 top=242 right=274 bottom=468
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: 3
- ----- HyperTalk script -----
- on mouseUp
- repeat with x=3 down to 2
- if char x of field "Difference" is "?" then
- put "3" into char x of field "Difference"
- put x into it
- subtract 1 from it
- if x>2 then put "?" into char it of field "Difference"
- exit mouseUp
- end if
- end repeat
- end mouseUp
-
-
-
- -- part 13 (button)
- -- low flags: 00
- -- high flags: 8003
- -- rect: left=355 top=281 right=313 bottom=407
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: 0
- ----- HyperTalk script -----
- on mouseUp
- repeat with x=3 down to 2
- if char x of field "Difference" is "?" then
- put "0" into char x of field "Difference"
- put x into it
- subtract 1 from it
- if x>2 then put "?" into char it of field "Difference"
- exit mouseUp
- end if
- end repeat
- end mouseUp
-
-
-
- -- part 14 (button)
- -- low flags: 00
- -- high flags: 8003
- -- rect: left=414 top=281 right=313 bottom=468
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Enter
- ----- HyperTalk script -----
- on mouseUp
- global answer
- if field "Difference" < 1 then exit mouseUp
- if field "Flag" > 0 then exit mouseUp
- put field "Minuend" into answer
- subtract field "Subtrahend" from answer
- add 1 to field "Attempts"
- if field "Difference" = answer then
- add 1 to field "Correct"
- get field "Correct"
- divide it by field "Attempts"
- multiply it by 100
- put round(it) into field "Percent"
- celebrate
- else
- get field "Correct"
- divide it by field "Attempts"
- multiply it by 100
- put round(it) into field "Percent"
- nag
- end if
- end mouseUp
-
- on celebrate
- put "Correct" into line 1 of field "Comment"
- put first word of bkgnd field "Name" into line 2 of field "Comment"
- hide button "Smiley"
- put "1" into field "Flag"
- if first word of bkgnd field "Options" = "Y" then
- play "Harpsichord" tempo 200 "g4e c5 e gh eq gh"
- end if
- end celebrate
-
- on nag
- global answer
- put "WRONG!" into line 1 of field "Comment"
- put "The answer is "& answer & "." into line 3 of field "Comment"
- hide button "Frowney"
- put "2" into field "Flag"
- if first word of bkgnd field "Options" = "Y" then
- play "boing" tempo 200 "gq c e a"
- end if
- end nag
-
-
-
- -- part 15 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=251 top=87 right=180 bottom=351
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Frowney
-
-
- -- part 16 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=14 top=87 right=178 bottom=110
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Smiley
-
-
- -- part 17 (button)
- -- low flags: 00
- -- high flags: 8003
- -- rect: left=3 top=306 right=338 bottom=67
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Quit
- ----- HyperTalk script -----
- on mouseUp
- go to first card
- end mouseUp
-
-
-
- -- part contents for background part 1
- ----- text -----
- O
-
- -- part contents for background part 2
- ----- text -----
- O
-
- -- part contents for background part 3
- ----- text -----
- O
-
- -- part contents for background part 4
- ----- text -----
-
-
- -- part contents for background part 5
- ----- text -----
-
-
- -- part contents for background part 8
- ----- text -----
- 1
-
- -- part contents for background part 9
- ----- text -----
- Y 10 3
-
- -- part contents for background part 10
- ----- text -----
- Larry